home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / samba / smblib / readme next >
Encoding:
Text File  |  1996-11-17  |  4.9 KB  |  123 lines

  1. I have put up the file
  2.  
  3.      ftp://samba.anu.edu.au/pub/samba/smblib01.tar.gz
  4.  
  5. which contains the first version of Richard's smblib. He is planning to 
  6. upload another version by the end of the week with better functionality 
  7. including the ability to do a tree connection.
  8.  
  9. Following is Richard's annouce which I have already posted to the samba 
  10. list, which will hopefully kick off the discussion.
  11.  
  12. --
  13.  Dan Shearer                            email: Dan.Shearer@UniSA.edu.au
  14.  Information Technology Unit            Phone: +61 8 302 3479
  15.  University of South Australia          Fax  : +61 8 302 3385
  16.  
  17.  
  18. ===================================================
  19.  
  20. SMBlib Introductory Message.
  21.  
  22. INTRODUCTION
  23.  
  24. I have released some code that I have called SMBlib. It was written over a 
  25. period of time to help me understand the SMB protocol more than I did, which 
  26. wasn't very much. As it happens, I have found even more things that I do not 
  27. understand:-).
  28.  
  29. I have had approval from my manager at Digital Equipment to post this code
  30. (with disclaimers that there is no support and that Digital is not liable,
  31. so I used the GPL) as example code that may not be useful to anyone :-)
  32.  
  33. When I started writing it, I wanted to allow for the possibility of SMB being 
  34. implemented over multiple protocols, not just IP, and have tried not to embed 
  35. too many IPisms in the code, but this may be just an artifact of there being so 
  36. little actually implemented.
  37.  
  38. WHAT IT IS AND WHAT IT DOES
  39. ---------------------------
  40.  
  41. Version 0.1 of SMBlib consists of SMBlib code and NetBIOS over TCP/IP code 
  42. (which I call RFCNB) implemented to RFC1002. It includes simple test programs 
  43. that I use to test the functionality. 
  44.  
  45. RFCNB can get a connection to a server and send an receive messages, although 
  46. the test probram only tests the establishment of connections. I infer that it 
  47. can send an receive messages because the SMBlib test program can send and 
  48. receive SMBs (and because I wrote the functionality).
  49.  
  50. I could not find any SESSION DISCONNECT protocol in RFC1002 (perhaps I can't 
  51. read :-), so I have assumed that one just drops the connection to terminate a 
  52. session.
  53.  
  54. The SMBlib portion contains code that can establish a connection to a server, 
  55. negotiate a protocol, and set up a tree connection. At this stage the only 
  56. protocol that it can negotiate is the Core Protocol (PC NETWORK PROGRAM 1.0)
  57. and it has only been tested getting a tree connection to a Windows 95 PC.
  58.  
  59. WHERE TO GO FROM HERE
  60. ---------------------
  61.  
  62. If I were implementing a package that was intended to be generally useful, I 
  63. would probably want to look very carefully at the interface that SMBlib 
  64. provides.
  65.  
  66. Initially, after discussions with Andrew Tridgell, I focussed on the idea of a 
  67. set of functions, but these, it seems to me now, were thought of without good 
  68. consideration of the client programs that might want to use the functions. 
  69.  
  70. Setting out the functions and then the problems I now see may help to explain 
  71. why I am concerned that the interface should be very carefully designed.
  72.  
  73. The functions we (Andrew and I) envisioned/envisaged were:
  74.  
  75.   Connect - This would take a service like \\fred\tree and would set up a 
  76. connection and return a handle
  77.  
  78.   Open - would take a connection handle and a file and open it on the server, 
  79. returning a file handle
  80.  
  81.   Close - would close the file
  82.  
  83.   Read - would take a file handle and read from the file
  84.  
  85.   Write - would take a file handle and some data and write to the file
  86.  
  87.   Disconnect - Would disconnect from the server
  88.  
  89.   A bunch of other routines would be available to do things that SMB allows you 
  90. to do.
  91.  
  92. The problem I forsee is that of what functionality to place where. Should the 
  93. client application have to build a file system model out of the primitives that 
  94. SMBlib provides, or should it see one presented by SMBlib. Should the client 
  95. application have to present <connection, file path> pairs to SMBlib, or should 
  96. it be able to present <file paths> to SMBlib and have SMBlib resolve that to a 
  97. connection?
  98.  
  99. A solution to this problem might be for some people to explore client 
  100. implementation issues so that the interface can be well designed up front.
  101.  
  102. A number of other issues come to mind that relate to the maintainability of the 
  103. code and what sort of structure should be used. In RFCNB I have tried to 
  104. separate out interface related definitions from implementation related 
  105. definitions, but this has not been as cleanly done in the SMBlib code itself. 
  106.  
  107. I am also not a make guru so my makefiles are primitive and there is quite a but 
  108. that is not implemented.
  109.  
  110. However, I hope that someone finds the code useful as a guide.
  111.  
  112. Regards
  113. --------
  114. Richard Sharpe,  sharpe@nmesis.enet.dec.com,  Ph: 61-8-235-7237,  FAX: ...-7299
  115. Digital Equipment Corporation, 139 Frome St, Adelaide 5001, South Australia, OZ
  116. * I have children to keep me poor in a monetary sense, but rich in so many    *
  117. * other ways!                                                                 *
  118. All opinions are those of the author, not of Digital Equipment!
  119.  
  120.  
  121.  
  122.  
  123.